package email.becode.simultaneous_interpretation_android.data

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
import kotlinx.coroutines.flow.Flow

@Dao
interface TranslationDao {
    @Insert
    suspend fun insert(record: TranslationRecord)

    @Query("SELECT * FROM translation_records ORDER BY timestamp DESC")
    fun getAllRecords(): Flow<List<TranslationRecord>>

    @Query("SELECT * FROM translation_records WHERE id = :id")
    suspend fun getRecordById(id: Long): TranslationRecord?
} 